<html>

<head>
	<meta charset="UTF-8"> 
	<script type="text/javascript">

		window.onresize = function(
			width  = window.innerWidth;
			var height = window.innerHeight;
			var text = width + ',' + height;
			document.getElementById('pos').innerHTML = text;
		);
	</script>
    <title>onresize事件</title>
</head>

<body>
	<div id='pos'></div>
</body>

</html>
